package com.yzlshdg.warehouse.service.impl;

import com.yzlshdg.warehouse.entity.Supply;
import com.yzlshdg.warehouse.mapper.SupplyMapper;
import com.yzlshdg.warehouse.service.SupplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SupplyServiceImpl implements SupplyService {

    @Autowired
    private SupplyMapper supplyMapper;

    @Override
    public List<Supply> getAllSupply() {
        return supplyMapper.getAllSupply();
    }

    @Override
    public Supply getSupplyById(String supplyId) {
        return supplyMapper.getSupplyById(supplyId);
    }

    @Override
    public int addSupply(Supply supply) {
        return supplyMapper.addSupply(supply);
    }

    @Override
    public int updateSupply(Supply supply) {
        return supplyMapper.updateSupply(supply);
    }

    @Override
    public int deleteSupply(String supplyId) {
        return supplyMapper.deleteSupply(supplyId);
    }
}
